// import Cookies from 'js-cookie'

const TokenKey = 'Authorization'

export function getToken() {
  // return Cookies.get(TokenKey)
  if (localStorage.getItem('isRememberAcc') === 'yes') {
    return localStorage.getItem(TokenKey)
  } else {
    return sessionStorage.getItem(TokenKey)
  }
}

export function setToken(token) {
  // return Cookies.set(TokenKey, token)
  if (localStorage.getItem('isRememberAcc') === 'yes') {
    return localStorage.setItem(TokenKey, token)
  } else {
    return sessionStorage.setItem(TokenKey, token)
  }
}

export function removeToken() {
  // return Cookies.remove(TokenKey)
  if (localStorage.getItem('isRememberAcc') === 'yes') {
    return localStorage.removeItem(TokenKey)
  } else {
    return sessionStorage.removeItem(TokenKey)
  }
}
